<include file="common/hearder" />
<div style="margin-top: 20px;">
    <a href="{:U('staffinfo/add')}" class="btn btn-info glyphicon glyphicon-plus-sign">添加</a>
    <button onclick="$('#list').submit();" type="button" class="btn btn-danger glyphicon glyphicon-eye-close">批量隐藏</button>
    <a href="{:U('staffinfo/hidden')}" class="btn btn-warning glyphicon glyphicon-eye-open">隐藏列表</a>
</div>
<div style="float: right;margin-top: -40px">
    <form class="navbar-form navbar-left" >
        <div class="form-group">
            <input type="text" name="value" class="form-control" placeholder="{$value ? $value : '请输入员工姓名或邮箱'}">
        </div>
        <input name="search" class="btn btn-success" type="submit" value="搜索">
        <!--<button name="search" type="submit" class="btn btn-default">搜索</button>-->
    </form>
</div>

<div style="margin-top: 20px">
    <form id="list" class="am-form" action="{:U('del_all',array('status'=>$v['status']))}">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th class="table-check">
                    <input type="checkbox" class="check_all"/>
                </th>
                <th class="table-id">id</th>
                <th class="table-title">员工姓名</th>
                <th class="table-title">员工性别</th>
                <th class="table-title">出生日期</th>
                <th class="table-title">所属部门</th>
                <th class="table-title">所属岗位</th>
                <th class="table-title">入职时间</th>
                <th class="table-title">离职时间</th>
                <th class="table-title">员工邮箱</th>
                <th class="table-title">员工学历</th>
                <th class="table-title">联系方式</th>
                <th class="table-title">身份证</th>
                <th class="table-set">操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="v" >
                <tr>
                    <td><input type="checkbox" class="check_item" name="ids[]" value="{$v.stf_id}"/></td>
                    <td>{$v.stf_id}</td>
                    <td>{$v.stf_name}</td>
                    <td>{$v['stf_sex']==0?'男':($v['stf_sex']==1?'女':'未知')}</td>
                    <td>{$v.stf_brith}</td>
                    <td>{$v.dpt_name}</td>
                    <td>{$v.pt_name}</td>
                    <td>{$v.wd_time}</td>
                    <td>{$v.rd_time}</td>
                    <td>{$v.stf_email}</td>
                    <td>{$v.stf_study}</td>
                    <td>{$v.stf_phone}</td>
                    <td>{$v.stf_bank}</td>
                    <td>
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <a href="{:U('edit',array('stf_id'=>$v['stf_id']))}" class="btn btn-info btn btn-primary btn-xs">编辑</a>
                                <a href="{:U('update',array('stf_id'=>$v['stf_id']))}" class="btn btn-info btn btn-primary btn-xs">调遣</a>
                                <a href="{:U('del',array('stf_id'=>$v['stf_id'],'status'=>$v['status']))}" class="btn btn-success btn btn-primary btn-xs ">隐藏</a>
                                <a href="{:U('repwd',array('stf_id'=>$v['stf_id']))}" class="btn btn-info btn btn-danger btn-xs">重置密码</a>
                            </div>
                        </div>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </form>
    <div class="pages">
        共 {$count} 条记录
        <div class="show_page">{$show}</div>
    </div>
</div>
<script>
    $('.check_all').on('click',function () {
        if ($(this).prop('checked')){
            $('.check_item').each(function () {
                if ($(this).prop('checked')){
                    $(this).prop('checked',false);
                }else {
                    $(this).prop('checked',true);
                }
            });
        }else {
            $('.check_item').prop('checked',false);
        }
    })
</script>
<style>
    .pages a,.pages span {
        display:inline-block;
        padding:2px 5px;
        margin:0 1px;
        border:1px solid #f0f0f0;
        -webkit-border-radius:3px;
        -moz-border-radius:3px;
        border-radius:3px;
    }
    .pages a,.pages li {
        display:inline-block;
        list-style: none;
        text-decoration:none; color:#58A0D3;
    }
    .pages a.first,.pages a.prev,.pages a.next,.pages a.end{
        margin:0;
    }
    .pages a:hover{
        border-color:#50A8E6;
    }
    .pages span.current{
        background:#50A8E6;
        color:#FFF;
        font-weight:700;
        border-color:#50A8E6;
    }


</style>

<include file="common/footer"/>